package com.example.demo;

import com.alibaba.nacos.api.config.ConfigType;
import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * Description: 请描述你的文件
 *
 * @author wuqirong
 * @date 2020-10-16
 * <p>
 * All rights Reserved, Designed www.xiao100.com
 */
@Configuration
@NacosPropertySource(groupId = "wqr", dataId = "test-config", autoRefreshed = true, type = ConfigType.YAML)
public class TestConfig {

    @NacosValue(value="${lp.test}",autoRefreshed = true)
    public String test;

    @PostConstruct
    public void init() {
        System.out.println("123");
    }

    public String getTest() {
        return test;
    }

}
